package com.horizon.common.constrants;

import com.horizon.common.util.HorizonUtil;
import org.springblade.core.tool.api.IResultCode;

/**
 * 系统结果码枚举.
 *
 * @author zhaoshb
 * @since 2022/11/30 09:47
 */
public enum HorizonResultCodeEnum implements IResultCode {

    SUCCEED(1000),

    SYSTEM_ERROR(1500),

    USER_INFO_NOT_EXIST(1501),

    STUDENT_EXTEND_INFO_NOT_EXIST(2501),

    DEVICE_NOT_EXIST(3501),

    SITE_SAVE_FAILED(4501),

    SITE_NOT_EXIST(4502),

    CLASSES_NOT_EXIST(5501),

    //------------------------------------终端服务------------------------------------

    EP_USER_NAME_OR_PASSWORD_NOT_EXIST(6501),

    EP_NOT_EXIST(6502),

    EP_USER_INFO_NOT_EXIST(6503),

    EP_UN_AUTHED(6504),

    ENDPOINT_AUTH_FAILED(6505),

    ENDPOINT_NOT_EXIST(6506),

    ENDPOINT_NO_PERMISSION_DO_OPERATION(6507);

    int code;

    HorizonResultCodeEnum(int code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return HorizonUtil.getLocaleMessage(this);
    }

    public int getCode() {
        return code;
    }
}
